package cn.hicard.risk.service.sys.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.hicard.core.Page;
import cn.hicard.core.PageResult;
import cn.hicard.core.Where;
import cn.hicard.risk.dao.sys.NoticeDao;
import cn.hicard.risk.entity.SysNotice;
import cn.hicard.risk.service.sys.NoticeService;

@Service
public class NoticeServiceImpl implements NoticeService{
	
	@Autowired
	private NoticeDao noticeDao;

	@Override
	public void delete(int pk) throws Exception {
		noticeDao.delete(pk);
	}

	@Override
	public SysNotice getByPk(Integer pk) throws Exception {
		return noticeDao.getByPk(pk);
	}

	@Override
	public SysNotice getNewest() throws Exception {
		return noticeDao.getNewest();
	}

	@Override
	public void save(SysNotice notice) throws Exception {
		noticeDao.save(notice);
	}

	@Override
	public PageResult<SysNotice> search(Where where, Page page)
			throws Exception {
		return noticeDao.search(where,page);
	}

	@Override
	public void update(SysNotice notice) throws Exception {
		noticeDao.update(notice);
	}

}
